home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj8506.arc
/
DOT.C
< prev
next >
Wrap
Text File
|
1986-09-14
|
896b
|
29 lines
/* dot.c - dot graphics benchmark for Blaise Ctools package */
...
#include "graph.h"
...
if( mode == 6 )
grinit(2,0,0) ; /* set mode */
else grinit(1,1,0) ;
timer() ; /* start timer */
for(i=0 ; i<nit ; i++)
{ for( j=0 ; j<nper ; j++ )
{ pos.y = i & 0x3f ; /* row = 0 - 15 */
pos.x = j & 0x7f ; /* col = 0 - 63 */
grptwrit(& pos,color) ; /* write the dot */
}
}
t = timer() ; /* collect elapsed time */
...
timer() ; /* start timer */
for(i=0 ; i<nit ; i++)
{ pos.y = i & 0x3f ; /* row = 0 - 15 */
pos.x = (i+i) & 0x7f ; /* col = 0 - 63 */
pos2.y = pos.y + nper ; /* end point */
pos2.x = pos.x + nper ;
grline(&pos,&pos2,color) ; /* write a 45 degree line */
}
t = timer() ; /* collect elapsed time */
...